/**
 * Copyright (c) 2006 RiseSoft Co.,Ltd  
 * $Header$
 */
package cn.newtest.bi.collection.formula.antlr;

import java.util.ArrayList;
import java.util.List;

import org.antlr.runtime.CharStream;
import org.antlr.runtime.Lexer;
import org.antlr.runtime.RecognitionException;
import org.antlr.runtime.RecognizerSharedState;

/**
 *
 *
 * @author <a href="mailto: chenjian@risesoft.net">陈健</a>
 * @version $Revision$
 * 
 */
public abstract class RiseAntlrLexer extends Lexer {
	
	public RiseAntlrLexer() {
		super();
	}

	public RiseAntlrLexer(CharStream input) {
		super(input);
	}

	public RiseAntlrLexer(CharStream input, RecognizerSharedState state) {
		super(input,state);
	}

	public List errorMessages = new ArrayList();
	
	public String getErrorMessage(RecognitionException e,String[] tokenNames){
		String msg = null;
    	msg = AntlrExceptionTranslator.translateLexerExceptionMessage(e, tokenNames);
    	errorMessages.add(msg);
		return msg;
	}

}
